package com.qf.servlet;

import com.qf.Utils.DaoUtils;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * description:
 * author:zgl
 * QQ: 473584672
 */
@WebServlet(urlPatterns = "/deletestu")
public class DeleteStudentServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String name= req.getParameter("dname");
        System.out.println(name);
        DaoUtils.deleteStudents(name);
        resp.sendRedirect("querystu");
    }
}
